package huriezy.quickcontacts.models.interfaces;

import java.io.File;
import java.io.FileNotFoundException;
import java.io.IOException;

import android.content.Intent;
import android.graphics.Bitmap;
import android.net.Uri;

public interface IPictureManager {

	/**
	 * Creates a file that saves a compressed {@link Bitmap} picture.
	 * 
	 * @return the {@link File} object relative to the image
	 * @throws IOException
	 */
	public File saveTempImageFile(Bitmap bitmapPicture);
	
	/**
	 * Retrieve full internal path from an incoming {@link Intent}. If the Uri
	 * point to an external link (ex : https address), a local file is created.
	 * 
	 * @param uri
	 *            the concerned {@link Uri}
	 * @return a {@link String} representing its full path
	 */
	public String getImagePath(Uri pictureFileURI);
	
	/**
	 * Reduce a picture from a donate image file
	 * 
	 * @param parentImageView
	 * @return
	 * @throws FileNotFoundException 
	 * @throws IOException 
	 */
	public Bitmap scaleImage(Uri pictureUri) throws FileNotFoundException, IOException;
	
}
